<?php
//首页
class IndexAction extends BaseAction {
  
  //首页
    public function index(){
		$this->display();
		}
		
		//导航
    public function left(){
    	$this->display();
    }
    
       //系统环境
    public function main(){
      if($this->_get("php")==1){
          $this->assign('php','1');
      }
    	$server_info = array(
    		'CMS版本'=>C('cms_versions'),
    		'操作系统'=>PHP_OS,
    		'运行环境'=>$_SERVER["SERVER_SOFTWARE"],
    		'PHP运行方式'=>php_sapi_name()." [<a href='".U('Index/main')."&php=1' target='main'>phpinfo</a>]",
    		'最大上传限制'=>ini_get('upload_max_filesize'),
    		'最大执行时间'=>ini_get('max_execution_time').'秒',
    		'服务器时间'=>date("Y年n月j日 H:i:s"),
    		//'北京时间'=>gmdate("Y年n月j日 H:i:s",time()+8*3600),
    		'服务器域名/IP'=>$_SERVER['SERVER_NAME'].' ['.gethostbyname($_SERVER['SERVER_NAME']).']',
    		'剩余空间'=>round((@disk_free_space(".")/(1024*1024)),2).'M',
    	);
    	//统计信息
      $stats = array(
        "博文总数" =>'120',
        '商品总数' =>'100',
        'CMS文章总数'=>'50',
        '留言' =>'100',
        '网站运行天数'=>'100',
        '插件数量' =>'9',
        '图片数量'=>'123',
        '分类数量'=>'33',
        "PR值"=>'9',
      );
      //开发信息
      $develop = array(
      "系统开发程序员" =>"Yoby",
      "模板设计"=>'Yoby',
      "鸣谢"=>"@",
      "微博"=>"@logoove",
      "开源程序"=>"Jquery,Kindeditor,reset.css,cycle",
      'ThinkPHP版本'=>THINK_VERSION,
      "AICMS最新版本"=>"V1.0.0301[立即更新]",
      );
      
      //官方新闻
      if(TRUE == C('cms_news')){
        $news = array(1,2,3,4,5,6,7,8);
        $this->assign('news',$news);
      }
    	$this->assign('server_info',$server_info);
    	$this->assign('stats',$stats);
    	$this->assign('develop',$develop);
    	$this->display();
    } 
}